﻿<?php
		include "pdfcrowd.php";
		$client = new Pdfcrowd("trantung8111", "970c8ea4ac0e157e01a8a316c8ac7698");
		//$client = new Pdfcrowd("ngheweb_vn", "7427840b54f8a5ed52994af51f0ff644");
		
		$link = 'http://localhost/luanvan/gv-inketqua.php?ma='.$_GET["ma"].'&nhom='.$_GET["nhom"].'&hk='.$_GET["hk"]."&act=in";
		
		$f = fopen($link, "rb");
		$contents = '';
		while (!feof($f)) {
		$contents .= fread($f, 8192);
		}
		fclose($f);
		
		$pdf = $client->convertHtml($contents);
		ob_start();
		header("Content-Type: application/pdf");
		header("Accept-Ranges: none");
		header("Content-Disposition: attachment; filename=\"bc.pdf\"");
		ob_end_flush();
		echo $pdf;
?>
